package com.smzd.projforge.business;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import com.smzd.core.business.AbstractService;
import com.smzd.core.dao.IDao;
import com.smzd.core.utils.json.FGRowConverter;
import com.smzd.projforge.dao.SuitDao;
import com.smzd.projforge.domain.Suit;

@Service
public class SuitService extends AbstractService<Suit> {
    @Autowired
    private SuitDao dao;
    
    @Override
    protected IDao<Suit> getDao() {
        return dao;
    }
    
    @Override
    protected FGRowConverter<Suit> getConverter() {
        return converter;
    }

    private static FGRowConverter<Suit> converter = new FGRowConverter<Suit>() {
        @Override
        public Object[] convert(Suit elem) {
            Object[] fs = new Object[]{
                    elem.getId(),
                    elem.getName(),
                    elem.getDescription()
                };
                return fs;
        }
    };
    
}